<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFarmerFeedbacksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('farmer_feedbacks', function (Blueprint $table) {
            $table->increments('id')->comment('民情反馈表');
            $table->integer('user_id')->nullable()->comment('用户id')->default(0);
            $table->tinyInteger('type')->nullable()->comment('反馈类型;遇到问题1，提供建议2')->default(0);
            $table->text('content')->nullable()->comment('反馈内容');
            $table->text('imgs')->nullable()->comment('图片或视频');
            $table->tinyInteger('status')->nullable()->comment('状态;未处理0，处理中1，已处理2')->default(0);
            $table->integer('region_id')->nullable()->comment('所属地区ID（1.北洸村）')->default(0);
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('farmer_feedbacks');
    }
}
